package com.shop.shop.service.impl;

import java.util.List;

import com.shop.shop.dao.ShopUserOrderMapper;
import com.shop.shop.domain.ShopUserOrder;
import com.shop.shop.service.IShopUserOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 用户，订单关联Service业务层处理
 * 
 * @author
 */
@Service
public class ShopUserOrderServiceImpl implements IShopUserOrderService
{
    @Autowired
    private ShopUserOrderMapper shopUserOrderMapper;

    /**
     * 查询用户，订单关联
     * 
     * @param userId 用户，订单关联主键
     * @return 用户，订单关联
     */
    @Override
    public ShopUserOrder selectShopUserOrderByUserId(Long userId)
    {
        return shopUserOrderMapper.selectShopUserOrderByUserId(userId);
    }

    /**
     * 查询用户，订单关联列表
     * 
     * @param shopUserOrder 用户，订单关联
     * @return 用户，订单关联
     */
    @Override
    public List<ShopUserOrder> selectShopUserOrderList(ShopUserOrder shopUserOrder)
    {
        return shopUserOrderMapper.selectShopUserOrderList(shopUserOrder);
    }

    /**
     * 新增用户，订单关联
     * 
     * @param shopUserOrder 用户，订单关联
     * @return 结果
     */
    @Override
    public int insertShopUserOrder(ShopUserOrder shopUserOrder)
    {
        return shopUserOrderMapper.insertShopUserOrder(shopUserOrder);
    }

    /**
     * 修改用户，订单关联
     * 
     * @param shopUserOrder 用户，订单关联
     * @return 结果
     */
    @Override
    public int updateShopUserOrder(ShopUserOrder shopUserOrder)
    {
        return shopUserOrderMapper.updateShopUserOrder(shopUserOrder);
    }

    /**
     * 批量删除用户，订单关联
     * 
     * @param userIds 需要删除的用户，订单关联主键
     * @return 结果
     */
    @Override
    public int deleteShopUserOrderByUserIds(Long[] userIds)
    {
        return shopUserOrderMapper.deleteShopUserOrderByUserIds(userIds);
    }

    /**
     * 删除用户，订单关联信息
     * 
     * @param userId 用户，订单关联主键
     * @return 结果
     */
    @Override
    public int deleteShopUserOrderByUserId(Long userId)
    {
        return shopUserOrderMapper.deleteShopUserOrderByUserId(userId);
    }
}
